
f = figure();

for k=1:3
    subplot(3,3,k)
    thistitle = string(NAMES(k));
    bar(MidEst(k,:),FreqEst(k,:))
    title(thistitle);
    set(gcf,'position',[20 50*k 1000 500])%bottom, left width and height of figure
end
for k=4:6
    subplot(3,3,k)
    thistitle = string(NAMES(k));
    bar(MidEst(k,:),FreqEst(k,:))
    title(thistitle);
    set(gcf,'position',[40 50*(k-3) 1000 500])%bottom, left width and height of figure
end
for k=7:9
    subplot(3,3,k)
    thistitle = string(NAMES(k));
    bar(MidEst(k,:),FreqEst(k,:))
    title(thistitle);
    set(gcf,'position',[60 50*(k-6) 1000 500])%bottom, left width and height of figure
end
fileName = horzcat(modelname, '.png');
fileName=join(fileName, "");
saveas(f,fileName);

